import request from '@/utils/request'

// 发起支付
export function alipayTradePagePay(productId) {
  return request({
    url: '/api/ali-pay/trade/page/pay/'+productId,
    method: 'post'
  })
}
// 取消订单
export function alipayTradeCancel(orderId) {
  return request({
    url: `/api/ali-pay/trade/cancel/${orderId}`,
    method: 'post'
  })
}
// 退款
export function alipayTradeRefund(orderId,reason) {
  return request({
    url: `/api/ali-pay/trade/refund/${orderId}/${reason}`,
    method: 'post'
  })
}

// 下载账单
export function alipayTradeDownloadBill(billDate, billType) {
  return request({
    url: `/api/ali-pay/bill/downloadurl/query/${billDate}/${billType}`,
    method: 'get'
  })
}

